import request from '@/utils/request'

// 查询员工工作经历子列表
export function listExperience(query) {
  return request({
    url: '/hrm/experience/list',
    method: 'get',
    params: query
  })
}

// 查询员工工作经历子详细
export function getExperience(expId) {
  return request({
    url: '/hrm/experience/' + expId,
    method: 'get'
  })
}

// 新增员工工作经历子
export function addExperience(data) {
  return request({
    url: '/hrm/experience',
    method: 'post',
    data: data
  })
}

// 修改员工工作经历子
export function updateExperience(data) {
  return request({
    url: '/hrm/experience',
    method: 'put',
    data: data
  })
}

// 删除员工工作经历子
export function delExperience(expId) {
  return request({
    url: '/hrm/experience/' + expId,
    method: 'delete'
  })
}

export function getExperienceByEmpId(empId) {
  return request({
    url: '/hrm/experience/listByEmpId/' + empId,
    method: 'get'
  })
}
